import { createBrowserRouter } from "react-router-dom";
import React from "react";

const Layout = React.lazy(()=>import('@/pages/Layout'))
const Login = React.lazy(()=>import('@/pages/Login'))
const Home = React.lazy(()=>import('@/pages/Home'))
const Article = React.lazy(()=>import('@/pages/Article'))
const Publish = React.lazy(()=>import('@/pages/Publish'))

const router = createBrowserRouter([
    {
        path:'/',
        element:<Layout/>,
        children:[
            {
                path:'/home',
                element:<Article />
            },
            {
                path:'/article',
                element:<Article />
            },
            {
                path:'/publish',
                element:<Publish />
            }
        ]
    },
    {
        path:'/login',
        element:<Login/>,
        children:[]
    }
])

export default router